<?php
    function lists()
    {
        $list = getSongLists( $_GET['groups_and_artists'] );
        for ( $i = 0; $i < count( $list ); $i++ )
        {
            $vars = array( 'ID' => $list[$i]['song_id'], 'SONG_NAME' => $list[$i]['song_name'] );
            $lists = $lists.parseTemplate( 'list.tpl', $vars );
        }
        return $lists;
    }
    require_once( './includes/common.inc.php' );
    if ( isset($_GET['groups_and_artists']) )
    {
        $title = $_GET['groups_and_artists'];
        $lists = lists();
        $vars = array( 'TITLE' => $title, 'TEXT' => $lists );
        $content = parseTemplate( 'content.tpl', $vars );
        $vars = array( 'TITLE' => $title, 'CONTENT' => $content );
        buildLayout( $vars );
    }
    else
    {
        header( 'Location: /php/6-strunka.php' );
    }
?>
